package aom.ju.ss.view.user.shop

import aom.ju.ss.R
import aom.ju.ss.databinding.ApplyShop2Binding
import aom.ju.ss.utils.SpUtils
import aom.ju.ss.utils.http.LP_API.API_MERCHANT_URL
import aom.ju.ss.utils.show
import aom.ju.ss.utils.start
import aom.ju.ss.view.base.BaseActivity
import aom.ju.ss.view.base.WebViewActivity

/**
 * 申请店铺2
 */
class ApplyForAShop2Activity : BaseActivity() {

    private lateinit var binding: ApplyShop2Binding
    override fun init() {
        binding = viewBinding as ApplyShop2Binding

        binding.textView12.setOnClickListener {
            WebViewActivity.startWeb(activity!!, "", API_MERCHANT_URL)
        }
        SpUtils.putString("sq", "0")
        binding.geren.setOnClickListener {
            binding.geren.setBackgroundResource(R.drawable.bg_zi_bian_5dp)
            binding.qiye.setBackgroundResource(R.drawable.bg_white_5dp)
            SpUtils.putString("sq", "0")
        }

        binding.qiye.setOnClickListener {
            binding.qiye.setBackgroundResource(R.drawable.bg_zi_bian_5dp)
            binding.geren.setBackgroundResource(R.drawable.bg_white_5dp)
            SpUtils.putString("sq", "1")
        }



        binding.ruzhu.setOnClickListener {
            if (!binding.check.isChecked) {
                "请先同意商家入驻协议".show
                return@setOnClickListener
            }
            start(ApplyForAShop3Activity::class.java)
        }
    }

    override val lay = R.layout.apply_shop2
}